package com.hnust.dao;

import com.hnust.domain.Chapter;
import com.hnust.domain.Course;
import com.hnust.domain.QuestionType;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface PaperAboutDao {
    //获取学院的课程
    @Select("select cou_id,name,cou_number from course where col_id=#{collegeId}")
    @ResultType(Course.class)
    List<Course> getAllCourse(String collegeId);

    //获取章节信息
    @Select("select * from chapter where cou_id=#{courseId} order by chapter, first, second, third")
    @ResultType(Chapter.class)
    List<Chapter> getAllChapter(String courseId);

    //获取题目类型
    @Select("select que_typ_id,type,name from question_type")
    @ResultType(QuestionType.class)
    List<QuestionType> getAllQuestionType();

}
